<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const ws = new WebSocket("ws://localhost:3000");

      ws.onopen = function () {
        console.log("open connet");
        ws.send("ok");
      };

      //   ws.onmessage = function (e) {
      //     console.log("服务端的传递的数据", e.data);
      //     ws.send("hello server");
      //   };
    </script>
  </body>
</html>
